package com.zs.framework.mail.config;

import com.zs.framework.mail.runner.MailRunner;
import com.zs.framework.mail.utils.SendEmailProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhougf
 * @version 1.0
 * @date 2020/07/23
 */
@Configuration
@ConditionalOnClass({SendEmailProducer.class})
@ConditionalOnProperty(prefix = "mail", value = "enabled", havingValue = "true", matchIfMissing = true)
@EnableConfigurationProperties({MailProperties.class})
@Slf4j
public class MailAutoConfiguration {

    @Autowired
    private MailProperties mailProperties;

}
